#ifdef PBC_CONSTANTPOOL_ENTRY

/// scope

// Create a new local context for a |scope|.
BytecodeArrayBuilder& CreateBlockContext(size_t scope_index);

// Create a new context for a catch block with |exception| and |scope|.
BytecodeArrayBuilder& CreateCatchContext(Register exception,
                                         size_t scope_index);

// Create a new context with the given |scope| and size |slots|.
BytecodeArrayBuilder& CreateFunctionContext(size_t scope_index, int slots);

// Create a new eval context with the given |scope| and size |slots|.
BytecodeArrayBuilder& CreateEvalContext(size_t scope_index, int slots);

// Creates a new context with the given |scope| for a with-statement
// with the |object| in a register.
BytecodeArrayBuilder& CreateWithContext(Register object, size_t scope_index);

/// AstRawString*

// Global loads to the accumulator and stores from the accumulator.
BytecodeArrayBuilder& LoadGlobal(size_t name_index, int feedback_slot,
                                 TypeofMode typeof_mode);
BytecodeArrayBuilder& StoreGlobal(size_t name_index, int feedback_slot);

// Lookup the variable with |name|.
BytecodeArrayBuilder& LoadLookupSlot(size_t name_index, TypeofMode typeof_mode);

#if V8_MAJOR_VERSION == 11
// Lookup the variable with |name|, which is known to be at |slot_index| at
// |depth| in the context chain if not shadowed by a context extension
// somewhere in that context chain.
BytecodeArrayBuilder& LoadLookupContextSlot(size_t name_index,
                                            TypeofMode typeof_mode,
                                            int slot_index, int depth);
#else
BytecodeArrayBuilder& LoadLookupContextSlot(size_t name_index,
                                            TypeofMode typeof_mode,
                                            ContextKind context_kind,
                                            int slot_index, int depth);
#endif

// Lookup the variable with |name|, which has its feedback in |feedback_slot|
// and is known to be global if not shadowed by a context extension somewhere
// up to |depth| in that context chain.
BytecodeArrayBuilder& LoadLookupGlobalSlot(size_t name_index,
                                           TypeofMode typeof_mode,
                                           int feedback_slot, int depth);

// Store value in the accumulator into the variable with |name|.
BytecodeArrayBuilder& StoreLookupSlot(size_t name_index,
                                      LanguageMode language_mode,
                                      LookupHoistingMode lookup_hoisting_mode);

// Named load property.
BytecodeArrayBuilder& LoadNamedProperty(Register object, size_t name_index,
                                        int feedback_slot);

// Define an own property named by a constant from the constant pool,
// trigger the defineProperty traps if necessary. The value to be
// defined should be in the accumulator.
BytecodeArrayBuilder& DefineNamedOwnProperty(Register object, size_t name_index,
                                             int feedback_slot);

// Literals creation.  Constant elements should be in the accumulator.
BytecodeArrayBuilder& CreateRegExpLiteral(size_t pattern_entry,
                                          int literal_index, int flags);

BytecodeArrayBuilder& ThrowReferenceErrorIfHole(size_t entry);

/// call
// Call a JS function which is known to be a property of a JS object. The
// JSFunction or Callable to be called should be in |callable|. The arguments
// should be in |args|, with the receiver in |args[0]|. The call type of the
// expression is in |call_type|. Type feedback is recorded in the
// |feedback_slot| in the type feedback vector.
BytecodeArrayBuilder& CallProperty(Register callable,
                                   std::vector<Register> args,
                                   int feedback_slot);

// Call a JS function with an known undefined receiver. The JSFunction or
// Callable to be called should be in |callable|. The arguments should be in
// |args|, with no receiver as it is implicitly set to undefined. Type
// feedback is recorded in the |feedback_slot| in the type feedback vector.
BytecodeArrayBuilder& CallUndefinedReceiver(Register callable,
                                            std::vector<Register> args,
                                            int feedback_slot);
#endif